import 'dart:convert';
/// pid : 113386
/// fid : 0
/// level : 0
/// aid : 0
/// bid : 0
/// sort : 1
/// title : "共享药学院"
/// fulltitle : "共享药学院"
/// is_learn_top : 0
/// icon_top : ""
/// icon_search : ""
/// is_disable : 0
/// is_delete : 0
/// create : "2023-07-03 10:32:22"
/// update : "2023-10-30 09:05:28"
/// single_count : 0
/// multiple_count : 0
/// zonghe_count : 0
/// peiwu_count : 0
/// judge_count : 0
/// exam_date : null
/// children : [{"pid":113387,"fid":113386,"level":1,"aid":0,"bid":0,"sort":0,"title":"共享药学院","fulltitle":"共享药学院","is_learn_top":0,"icon_top":"","icon_search":"","is_disable":0,"is_delete":0,"create":"2023-07-03 10:32:22","update":"2023-11-09 16:55:55","single_count":0,"multiple_count":0,"zonghe_count":0,"peiwu_count":0,"judge_count":0,"exam_date":"2024-10-17 00:00:00"}]

CatetoryModel catetoryModelFromJson(String str) => CatetoryModel.fromJson(json.decode(str));
String catetoryModelToJson(CatetoryModel data) => json.encode(data.toJson());
class CatetoryModel {
  CatetoryModel({
      num? pid, 

      String? title, 

      dynamic examDate, 
      List<CatetoryModel>? children,}){
    _pid = pid;

    _title = title;

    _examDate = examDate;
    _children = children;
}

  CatetoryModel.fromJson(dynamic json) {
    _pid = json['pid'];

    _title = json['title'];

    _examDate = json['exam_date'];
    isSelected = json["isSelected"] ?? false;
    if (json['children'] != null) {
      _children = [];
      json['children'].forEach((v) {
        _children?.add(CatetoryModel.fromJson(v));
      });
    }
  }
  num? _pid;

  String? _title;

  dynamic _examDate;
  List<CatetoryModel>? _children;
  bool isSelected = false;
CatetoryModel copyWith({  num? pid,

  String? title,

  dynamic examDate,
  List<CatetoryModel>? children,
}) => CatetoryModel(  pid: pid ?? _pid,

  title: title ?? _title,


  examDate: examDate ?? _examDate,
  children: children ?? _children,
);
  num? get pid => _pid;

  String? get title => _title;

  dynamic get examDate => _examDate;
  List<CatetoryModel>? get children => _children;

  Map<String, dynamic> toJson() {
    final map = <String, dynamic>{};
    map['pid'] = _pid;

    map['title'] = _title;

    map['exam_date'] = _examDate;
    map["isSelected"] = isSelected;
    if (_children != null) {
      map['children'] = _children?.map((v) => v.toJson()).toList();
    }
    return map;
  }

}

/// pid : 113387
/// fid : 113386
/// level : 1
/// aid : 0
/// bid : 0
/// sort : 0
/// title : "共享药学院"
/// fulltitle : "共享药学院"
/// is_learn_top : 0
/// icon_top : ""
/// icon_search : ""
/// is_disable : 0
/// is_delete : 0
/// create : "2023-07-03 10:32:22"
/// update : "2023-11-09 16:55:55"
/// single_count : 0
/// multiple_count : 0
/// zonghe_count : 0
/// peiwu_count : 0
/// judge_count : 0
/// exam_date : "2024-10-17 00:00:00"

